package com.oyesgo.statistics.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @FileName LogInfo.java
 * @Description: 日志模型
 * @author rose
 * @version 1.0
 * <p>Company: OYESGO</p>
 * <p>Copyright: Copyright (c) 2010</p>
 */
public class LogInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	private int 	id;					//主键
	private String	userIp;				//用户ip
	private Date 	visitTime;			//访问时间
	private String 	visitUrl;			//访问地址
	private int 	visitState;			//访问状态
	private String 	userAgent;			//浏览器信息
	
	private String 	fromUrl;			//推广源的url
	private String 	refKey;				//推广源的key
	private String 	cookie;				//cookie缓存
	private String 	channelType;		//频道类型
	private int 	pageType;			//页面类型 1 .jsp 2 servlet or 首页 3.php 4.html
	private String visitTimeStr = "";	//访问时间字符串
	public String getVisitTimeStr() {
		return visitTimeStr;
	}
	public void setVisitTimeStr(String visitTimeStr) {
		this.visitTimeStr = visitTimeStr;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getUserIp() {
		return userIp;
	}
	public void setUserIp(String userIp) {
		this.userIp = userIp;
	}
	public Date getVisitTime() {
		return visitTime;
	}
	public void setVisitTime(Date visitTime) {
		this.visitTime = visitTime;
	}
	public String getVisitUrl() {
		return visitUrl;
	}
	public void setVisitUrl(String visitUrl) {
		this.visitUrl = visitUrl;
	}
	public int getVisitState() {
		return visitState;
	}
	public void setVisitState(int visitState) {
		this.visitState = visitState;
	}
	public String getUserAgent() {
		return userAgent;
	}
	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}
	
	public String getFromUrl() {
		return fromUrl;
	}
	public void setFromUrl(String fromUrl) {
		this.fromUrl = fromUrl;
	}
	public String getRefKey() {
		return refKey;
	}
	public void setRefKey(String refKey) {
		this.refKey = refKey;
	}
	public String getCookie() {
		return cookie;
	}
	public void setCookie(String cookie) {
		this.cookie = cookie;
	}
	public String getChannelType() {
		return channelType;
	}
	public void setChannelType(String channelType) {
		this.channelType = channelType;
	}
	public int getPageType() {
		return pageType;
	}
	public void setPageType(int pageType) {
		this.pageType = pageType;
	}
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("id:"+id).append(",");
		sb.append("userIp:"+userIp).append(",");
		sb.append("visitDate:"+visitTime).append(",");
		sb.append("visitUrl:"+visitUrl).append(",");
		sb.append("visitState:"+visitState).append(",");
		sb.append("userAgent:"+userAgent).append(",");
		sb.append("refkey:"+refKey).append(",");
		sb.append("fromUrl:"+fromUrl).append(",");
		sb.append("cookie:"+cookie).append(",");
		sb.append("channelType:"+cookie).append(",");
		sb.append("pageType:"+cookie);
		return sb.toString();
	}
}
